﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MeterReader.WPF.Models
{
	public class SimDbContext:DbContext
	{
		public DbSet<TMeter> TMeters { get; set; }

        public SimDbContext(DbContextOptions<SimDbContext> options):base(options) { }
       
        protected override void OnModelCreating(ModelBuilder modelBuilder)
		{
			modelBuilder.Entity<TMeter>(entity =>
			{
				entity.ToTable("T_Meters");
				entity.Property(e => e.Id).HasColumnName("ID");
				entity.HasKey(e => e.Id);
			});
		}
	}
}
